package two2;

import java.util.Scanner;

public class qiunianling {
    public static void main(String[] args) {
        int a,b,c,d,e,f;
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入你出生的年份");
        a= scanner.nextInt();
        System.out.println("输入你出生的月份");
        b= scanner.nextInt();
        System.out.println("输入你出生的日份");
        c= scanner.nextInt();
        System.out.println("输入你现在的年份");
        d= scanner.nextInt();
        System.out.println("输入你现在的月份");
        e= scanner.nextInt();
        System.out.println("输入你现在的日份");
        f= scanner.nextInt();
        int age=d-a;
        if (e>=b&&f>=c){
            age=d-a;
        }else{
            age=d-a-1;
        }
        System.out.println("age="+age);
    }
}
